

    \filetitle{diffloglik}{Approximate gradient and hessian of log-likelihood function}{model/diffloglik}

	\paragraph{Syntax}

\begin{verbatim}
[MinusLogLik,Grad,Hess,V] = diffloglik(M,Inp,Range,PList,...)
\end{verbatim}

\paragraph{Input arguments}

\begin{itemize}
\item
  \texttt{M} {[} model {]} - Model object whose likelihood function will
  be differentiated.
\item
  \texttt{Inp} {[} cell \textbar{} struct {]} - Input data from which
  measurement variables will be taken.
\item
  \texttt{Range} {[} numeric \textbar{} char {]} - Date range on which
  the likelihood function will be evaluated.
\item
  \texttt{PList} {[} cellstr {]} - List of model parameters with respect
  to which the likelihood function will be differentiated.
\end{itemize}

\paragraph{Output arguments}

\begin{itemize}
\item
  \texttt{MinusLogLik} {[} numeric {]} - Value of minus the likelihood
  function at the input data.
\item
  \texttt{Grad} {[} numeric {]} - Gradient (or score) vector.
\item
  \texttt{Hess} {[} numeric {]} - Hessian (or information) matrix.
\item
  \texttt{V} {[} numeric {]} - Estimated variance scale factor if the
  \texttt{\textquotesingle{}relative=\textquotesingle{}} options is
  true; otherwise \texttt{v} is 1.
\end{itemize}

\paragraph{Options}

\begin{itemize}
\item
  \texttt{\textquotesingle{}chkSstate=\textquotesingle{}} {[}
  \texttt{true} \textbar{} \emph{\texttt{false}} \textbar{} cell {]} -
  Check steady state in each iteration; works only in non-linear models.
\item
  \texttt{\textquotesingle{}solve=\textquotesingle{}} {[}
  \emph{\texttt{true}} \textbar{} \texttt{false} \textbar{} cellstr {]}
  - Re-compute solution for each parameter change; you can specify a
  cell array with options for the \texttt{solve} function.
\item
  \texttt{\textquotesingle{}sstate=\textquotesingle{}} {[} \texttt{true}
  \textbar{} \emph{\texttt{false}} \textbar{} cell {]} - Re-compute
  steady state in each differentiation step; if the model is non-linear,
  you can pass in a cell array with options used in the \texttt{sstate}
  function.
\end{itemize}

See help on \href{model/filter}{\texttt{model/filter}} for other options
available.

\paragraph{Description}

\paragraph{Example}


